]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Remove the secondary icon from Notification
authorJulian Sparber <julian@sparber.net>
Thu, 25 Jan 2024 17:02:43 +0000 (18:02 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 30 Jan 2024 17:05:23 +0000 (17:05 +0000)
This was only used by the telepathy client, but after dropping the
presense indicator this isn't used anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>

js/ui/messageTray.js

index 42ded63fb8a9e1427fcef6faaaa3a3d5399410bc..eba40c0bbbca6e211b548644c46ab8c801421b0d 100644 (file)
@@ -333,9 +333,6 @@ export const NotificationApplicationPolicy = GObject.registerClass({
 // However, if @params contains a 'gicon' parameter, the passed in gicon
 // will be used.
 //
-// You can add a secondary icon to the banner with 'secondaryGIcon'. There
-// is no fallback for this icon.
-//
 // If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
 // <i> and <u>) of the markup in [1] will be interpreted within @banner. If
 // the parameter is not present, then anything that looks like markup
@@ -401,7 +398,6 @@ export const Notification = GObject.registerClass({
     update(title, banner, params) {
         params = Params.parse(params, {
             gicon: null,
-            secondaryGIcon: null,
             bannerMarkup: false,
             clear: false,
             datetime: null,
@@ -421,9 +417,6 @@ export const Notification = GObject.registerClass({
         if (params.gicon || params.clear)
             this.gicon = params.gicon;
 
-        if (params.secondaryGIcon || params.clear)
-            this.secondaryGIcon = params.secondaryGIcon;
-
         if (params.clear)
             this.actions = [];
 
@@ -518,7 +511,6 @@ export const NotificationBanner = GObject.registerClass({
         this._buttonBox = null;
 
         this._addActions();
-        this._addSecondaryIcon();
 
         this.notification.connectObject('activated', () => {
             // We hide all types of notifications once the user clicks on
@@ -533,13 +525,11 @@ export const NotificationBanner = GObject.registerClass({
         super._onUpdated(n, clear);
 
         if (clear) {
-            this.setSecondaryActor(null);
             this.setActionArea(null);
             this._buttonBox = null;
         }
 
         this._addActions();
-        this._addSecondaryIcon();
     }
 
     _addActions() {
@@ -548,16 +538,6 @@ export const NotificationBanner = GObject.registerClass({
         });
     }
 
-    _addSecondaryIcon() {
-        if (this.notification.secondaryGIcon) {
-            const icon = new St.Icon({
-                gicon: this.notification.secondaryGIcon,
-                x_align: Clutter.ActorAlign.END,
-            });
-            this.setSecondaryActor(icon);
-        }
-    }
-
     addButton(button, callback) {
         if (!this._buttonBox) {
             this._buttonBox = new St.BoxLayout({